home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DDJMAG / DDJ9207.ZIP / STRUCPRG.ASC < prev    next >
Text File  |  1992-06-15  |  680b  |  30 lines

  1. _STRUCTURED PROGRAMMING COLUMN_
  2. by Jeff Duntemann
  3.  
  4. [Example 1: The stream registration record definition]
  5.  
  6.  
  7. TStreamRec = RECORD
  8.   ObjType : Word;    { You define a unique code for this field     }
  9.   VMTLink : Word;    { The offset of the type's VMT in the dataseg }
  10.   Load    : Pointer; { The full address of the type's Load method  }
  11.   Store   : Pointer  { The full address of the type's Store method }
  12. END;
  13.  
  14.               
  15.  
  16.  
  17.  
  18.  
  19. [Example 2: The registration record for TMortgage]
  20.  
  21. CONST
  22.   RMortgage : TStreamRec =
  23.     (ObjType : 1200;
  24.     VMTLink : Ofs(TypeOf(TMortgage)^);
  25.     Load    : @TMortgage.Load;
  26.     Store   : @TMortgage.Store);
  27.          
  28.  
  29.  
  30.